USE db_World

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID('usp_addInterestRateForOneMonth'))
BEGIN
    DROP PROCEDURE usp_addInterestRateForOneMonth
END
GO

CREATE PROCEDURE usp_addInterestRateForOneMonth(@AccountId INT, @InterestRate FLOAT)
AS
	SELECT dbo.fn_calculateInterestBySumAndMonths(account_balance, @InterestRate, 1) -- always use functions with schema
		FROM tbl_Accounts
	WHERE account_id = @AccountId
GO

EXEC usp_addInterestRateForOneMonth @AccountId = 1, @InterestRate = 4
GO